﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ManagerJobList.aspx.cs" Inherits="Admin_Job_JobManager"
    EnableViewState="true" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>职位列表</title>
    <link rel="stylesheet" href="../skin/style.css" type="text/css" />

    <script type="text/javascript" src="../../js/jquery-cn.js"></script>

    <script type="text/javascript" src="../../js/jquery.js"></script>

    <script type="text/javascript">
        function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
          
    function checkbox(str){
        var message="";
        if(str=="1"){
            message="确定要删除吗？";
        }else if(str=="2"){
            message="确定要将此条信息审核通过吗？";
        }else if(str=="3"){
            message="确定要将此条信息审核未通过吗？";
        }else{
            message="确定要将此条信息推荐吗？";
        }
        // 找到所有的 input 元素
        var ctllist = window.document.form1.getElementsByTagName("input");
        var chec=false;             
        for( var i = 0; i< ctllist.length; i++){
            if( ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0){
                if(ctllist[i].checked==true){
                    chec=true;  
                }
            }           
        }
        if(chec==false){
            alert("请至少选择一项");
            return false;
        }else
        {
           return confirm(message);
        }    
    }  
    </script>

    <style type="text/css">
    .head {height: 29px; background:url(../images/titel_Bg.gif) repeat-x; font: bold 12px/29px "宋体"; color:#000;}
</style>
</head>
<body>
    <form id="form1" runat="server">
        <div class="itemtitle">
            <h3>
                管理员职位管理</h3>
        </div>
        <div class="itemtitle_tect">
            <ul>
                <li>通过职位管理，您可以进行编辑信息审核、推荐、修改和删除等操作；</li>
            </ul>
        </div>
        <div class="clr">
        </div>
        <div class="partition">
            <div class="Option">
                <asp:Label ID="Label5" runat="server"><a href="ManagerJobList.aspx?Verify=0"><strong>所有信息</strong> </a></asp:Label>
                <asp:Label ID="Label1" runat="server"><a href="ManagerJobList.aspx?Verify=3">未审核</a></asp:Label>
                <asp:Label ID="Label2" runat="server"><a href="ManagerJobList.aspx?Verify=1">已审核</a></asp:Label>
                <asp:Label ID="Label3" runat="server"><a href="ManagerJobList.aspx?Verify=2">推荐</a></asp:Label>
            </div>
            <div class="search">
                职位名称：<asp:TextBox ID="txtpostion" runat="server" Width="130"></asp:TextBox>
                职位类别：<asp:DropDownList ID="dropTypeID" runat="server">
                </asp:DropDownList>
                公司名称：<asp:TextBox ID="txtcompany" runat="server" Width="130"></asp:TextBox>
                <asp:Button ID="btnSelect" runat="server" Text="立即查询" CssClass="i_button" OnClick="btnSelect_Click">
                </asp:Button>
            </div>
        </div>
        <div class="clr">
        </div>
        <div class="talbe_border">
            <asp:GridView ID="grdJob" DataKeyNames="ID" runat="server" AutoGenerateColumns="False"
                CellPadding="0" CssClass="talbe_list" OnRowDeleting="grdJob_RowDeleting" OnRowDataBound="grdJob_RowDataBound"
                GridLines="None">
                <EmptyDataTemplate>
                    <%--  <table cellpadding="0" cellspacing="0" >
                        <tr class="head">
                            <td >
                                选项
                            </td>
                            <td class="th80">
                                公司名称
                            </td>
                            <td class="th80">
                                发布时间
                            </td>
                            <td class="th80">
                                截止时间
                            </td>
                            <td class="th80">
                                审核状态
                            </td>
                            <td class="th80">
                                推荐状态
                            </td>
                            <td class="th80">
                                联系地址
                            </td>
                            <td class="th80">
                                删除
                            </td>
                        </tr>
                    </table>--%>
                    <span style="float:left;">
                        <asp:Label ID="lblMessage" runat="server" ForeColor="red" Text="暂无数据"></asp:Label>
                    </span>
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="选项">
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="th20 tou" />
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="公司名称">
                        <ItemTemplate>
                            <%# Eval("CompanyName")%>
                        </ItemTemplate>
                        <ItemStyle Width="30%" CssClass="left2" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="职位名称">
                        <ItemTemplate>
                            <a href='ManagerJobEdit.aspx?jobid=<%# DataBinder.Eval(Container.DataItem,"id") %>'>
                                <%# Eval("Position")%>
                            </a>
                        </ItemTemplate>
                        <ItemStyle Width="15%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="发布时间">
                        <ItemTemplate>
                            <%# GetShortDate(DataBinder.Eval(Container.DataItem, "AddDate").ToString())%>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText=" 截止时间">
                        <ItemTemplate>
                            <%# GetShortDate(DataBinder.Eval(Container.DataItem, "EndDate").ToString())%>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="审核状态">
                        <ItemTemplate>
                            <%# turncn(Convert.ToInt32(Eval("verify")))%>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="推荐状态">
                        <ItemTemplate>
                            <%# recommend(Convert.ToBoolean(Eval("isRecommend")))%>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="删除">
                        <ItemTemplate>
                            <asp:LinkButton ID="BtnDelete" runat="server" CommandName="Delete" OnClientClick="return confirm('确认要删除此条信息吗？')">删除</asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="header" />
            </asp:GridView>
            <div class="Paging">
                <p>
                    <uc1:PageNo ID="PageNo1" runat="server" />
                </p>
                <input id="CheckBox2" name="CheckBox2" onclick="SelectAll();" type="checkbox" />
                全选
                <asp:Button ID="btnDelete" CssClass="i_button1" runat="server" OnClientClick="return checkbox('1');"
                    Text="批量删除" OnClick="btnDelete_Click" />
                <asp:Button ID="ButEigible" runat="server" Text="审核通过" CssClass="i_button1" OnClientClick="return checkbox('2');"
                    OnClick="ButEigible_Click" />
                <asp:Button ID="ButDisqualification" runat="server" Text="审核未通过" CssClass="i_button1"
                    OnClientClick="return checkbox('3');" OnClick="ButDisqualification_Click" />
                <asp:Button ID="BtnRecord" runat="server" Text="推荐" CssClass="i_button" OnClientClick="return checkbox('4');"
                    OnClick="BtnRecord_Click" />
            </div>
        </div>
        <asp:HiddenField ID="HiddenField1" runat="server" />
    </form>
</body>
</html>
